import React from 'react';
import ReactDOM from 'react-dom';
import {createStore,applyMiddleware,compose} from 'redux';
import thunk from 'redux-thunk';
import {Provider} from 'react-redux';
import {BrowserRouter} from 'react-router-dom';
import './index.css';
import './config';
import reducers from  './reducers'
import App from './App';

const store = createStore(reducers,compose(
	applyMiddleware(thunk),
	window.devToolsExtension ? window.devToolsExtension() : f=>f
));
// console.log(store.getState());
	
	ReactDOM.render(
		(<Provider store={store}>
			<BrowserRouter>
				<App />
			</BrowserRouter>
		</Provider>),
		document.getElementById('root')
	);
